.class Lcom/estrongs/android/taskmanager/w;
.super Landroid/os/AsyncTask;


# instance fields
.field final synthetic a:Lcom/estrongs/android/taskmanager/CacheManWrapper;

.field private final synthetic b:I


# direct methods
.method constructor <init>(Lcom/estrongs/android/taskmanager/CacheManWrapper;I)V
    .locals 0

    iput-object p1, p0, Lcom/estrongs/android/taskmanager/w;->a:Lcom/estrongs/android/taskmanager/CacheManWrapper;

    iput p2, p0, Lcom/estrongs/android/taskmanager/w;->b:I

    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    return-void
.end method


# virtual methods
.method protected varargs a([Ljava/lang/Void;)Ljava/lang/Void;
    .locals 8

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/w;->a:Lcom/estrongs/android/taskmanager/CacheManWrapper;

    iget-object v0, v0, Lcom/estrongs/android/taskmanager/CacheManWrapper;->mList:Ljava/util/List;

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/w;->a:Lcom/estrongs/android/taskmanager/CacheManWrapper;

    iget-object v1, v1, Lcom/estrongs/android/taskmanager/CacheManWrapper;->mList:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-gt v0, v1, :cond_0

    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/w;->a:Lcom/estrongs/android/taskmanager/CacheManWrapper;

    iget-object v0, v0, Lcom/estrongs/android/taskmanager/CacheManWrapper;->mList:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :goto_0
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_1

    new-instance v0, Lcom/estrongs/android/taskmanager/x;

    iget v1, p0, Lcom/estrongs/android/taskmanager/w;->b:I

    invoke-direct {v0, p0, v1}, Lcom/estrongs/android/taskmanager/x;-><init>(Lcom/estrongs/android/taskmanager/w;I)V

    invoke-static {v2, v0}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/w;->a:Lcom/estrongs/android/taskmanager/CacheManWrapper;

    iget-object v0, v0, Lcom/estrongs/android/taskmanager/CacheManWrapper;->mList:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_1
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_3

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/w;->a:Lcom/estrongs/android/taskmanager/CacheManWrapper;

    invoke-virtual {v0}, Lcom/estrongs/android/taskmanager/CacheManWrapper;->onDataPrepared()V

    :cond_0
    const/4 v0, 0x0

    return-object v0

    :cond_1
    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/content/pm/ApplicationInfo;

    iget-object v1, p0, Lcom/estrongs/android/taskmanager/w;->a:Lcom/estrongs/android/taskmanager/CacheManWrapper;

    iget-object v1, v1, Lcom/estrongs/android/taskmanager/CacheManWrapper;->pkgStatsMap:Ljava/util/HashMap;

    iget-object v4, v0, Landroid/content/pm/ApplicationInfo;->packageName:Ljava/lang/String;

    invoke-virtual {v1, v4}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/content/pm/PackageStats;

    if-eqz v1, :cond_2

    new-instance v4, Lcom/estrongs/android/taskmanager/z;

    iget-object v5, p0, Lcom/estrongs/android/taskmanager/w;->a:Lcom/estrongs/android/taskmanager/CacheManWrapper;

    iget-wide v6, v1, Landroid/content/pm/PackageStats;->cacheSize:J

    invoke-direct {v4, v5, v0, v6, v7}, Lcom/estrongs/android/taskmanager/z;-><init>(Lcom/estrongs/android/taskmanager/CacheManWrapper;Landroid/content/pm/ApplicationInfo;J)V

    invoke-interface {v2, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    :cond_2
    new-instance v1, Lcom/estrongs/android/taskmanager/z;

    iget-object v4, p0, Lcom/estrongs/android/taskmanager/w;->a:Lcom/estrongs/android/taskmanager/CacheManWrapper;

    const-wide/16 v5, -0x1

    invoke-direct {v1, v4, v0, v5, v6}, Lcom/estrongs/android/taskmanager/z;-><init>(Lcom/estrongs/android/taskmanager/CacheManWrapper;Landroid/content/pm/ApplicationInfo;J)V

    invoke-interface {v2, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_0

    :cond_3
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/estrongs/android/taskmanager/z;

    iget-object v2, p0, Lcom/estrongs/android/taskmanager/w;->a:Lcom/estrongs/android/taskmanager/CacheManWrapper;

    iget-object v2, v2, Lcom/estrongs/android/taskmanager/CacheManWrapper;->mList:Ljava/util/List;

    iget-object v0, v0, Lcom/estrongs/android/taskmanager/z;->a:Landroid/content/pm/ApplicationInfo;

    invoke-interface {v2, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_1
.end method

.method protected varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1

    check-cast p1, [Ljava/lang/Void;

    invoke-virtual {p0, p1}, Lcom/estrongs/android/taskmanager/w;->a([Ljava/lang/Void;)Ljava/lang/Void;

    move-result-object v0

    return-object v0
.end method
